Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests: Add following test cases for passkey with LDAP. IPA, AD and Samba #6634

Closed

Conversation

madhuriupadhye
Copy link
Contributor

@madhuriupadhye madhuriupadhye commented Mar 20, 2023

  1. Register a key with sssctl.
  2. Register a key with IPA sssctl command.
  3. Check authentication of user with IPA, LDAP, AD and Samba.

All tests cases automated with umockdev.

Copy link
Contributor

@ikerexxe ikerexxe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked the first four test cases, and I have added some minor comments. On top of that, would it be possible to reuse the test cases among different servers (IPA, LDAP, AD)? There are minor differences that could be tackled programmatically.

Finally, this is a note for future PRs. It would be nice to divide the changes in several commits. For this PR I would have added one commit to add the changes to the testing framework, and then one commit per test case which could include the scripts. This way you help in the review process by providing small chunks of changes instead of a big commit.

src/tests/system/lib/sssd/utils/authentication.py Outdated Show resolved Hide resolved
src/tests/system/lib/sssd/utils/authentication.py Outdated Show resolved Hide resolved
src/tests/system/tests/test_passkey.py Outdated Show resolved Hide resolved
src/tests/system/tests/test_passkey.py Outdated Show resolved Hide resolved
@ikerexxe
Copy link
Contributor

By the way, you should check the CI output, as it's reporting some errors to your changes.

Copy link
Contributor

@spoore1 spoore1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of my comments here center around trying to combine the LDAP/IPA test cases. I think it should be possible if you add the same methods to LDAPUser that you added to IPAUser.

src/tests/system/lib/sssd/roles/ldap.py Outdated Show resolved Hide resolved
src/tests/system/lib/sssd/utils/authentication.py Outdated Show resolved Hide resolved
src/tests/system/lib/sssd/utils/authentication.py Outdated Show resolved Hide resolved
src/tests/system/lib/sssd/utils/authentication.py Outdated Show resolved Hide resolved
src/tests/system/tests/test_passkey.py Outdated Show resolved Hide resolved
src/tests/system/tests/test_passkey.py Outdated Show resolved Hide resolved
src/tests/system/tests/test_passkey.py Outdated Show resolved Hide resolved
src/tests/system/tests/test_passkey.py Outdated Show resolved Hide resolved
src/tests/system/tests/test_passkey.py Outdated Show resolved Hide resolved
src/tests/system/tests/test_passkey.py Outdated Show resolved Hide resolved
Copy link
Member

@pbrezina pbrezina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, this is a very good start, kudos. I haven't gone trough the whole thing, I will wait until current comments are resolved to continue with the review.

src/tests/system/lib/sssd/roles/ipa.py Outdated Show resolved Hide resolved
src/tests/system/lib/sssd/roles/ipa.py Outdated Show resolved Hide resolved
src/tests/system/lib/sssd/roles/ldap.py Outdated Show resolved Hide resolved
src/tests/system/lib/sssd/utils/authentication.py Outdated Show resolved Hide resolved
src/tests/system/lib/sssd/utils/authentication.py Outdated Show resolved Hide resolved
src/tests/system/lib/sssd/utils/authentication.py Outdated Show resolved Hide resolved
src/tests/system/tests/test_passkey.py Outdated Show resolved Hide resolved
@madhuriupadhye madhuriupadhye force-pushed the passkey_tests_part1 branch 3 times, most recently from b3dd65f to d7c9362 Compare March 31, 2023 16:17
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CodeQL found more than 10 potential problems in the proposed changes. Check the Files changed tab for more details.

Copy link
Contributor

@ikerexxe ikerexxe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR is progressing towards an optimal state, but there are still some things to improve.

src/tests/system/lib/sssd/utils/authentication.py Outdated Show resolved Hide resolved
src/tests/system/tests/test_passkey.py Outdated Show resolved Hide resolved
src/tests/system/tests/test_passkey.py Outdated Show resolved Hide resolved
src/tests/system/tests/test_passkey.py Outdated Show resolved Hide resolved
src/tests/system/tests/test_passkey.py Outdated Show resolved Hide resolved
@madhuriupadhye madhuriupadhye added the passkey Issues and PRs related to 'passkey' feature label Apr 4, 2023
src/tests/system/tests/test_passkey.py Outdated Show resolved Hide resolved
src/tests/system/tests/test_passkey.py Outdated Show resolved Hide resolved
src/tests/system/tests/test_passkey.py Outdated Show resolved Hide resolved
src/tests/system/tests/test_passkey.py Outdated Show resolved Hide resolved
src/tests/system/tests/test_passkey.py Outdated Show resolved Hide resolved
src/tests/system/tests/test_passkey.py Outdated Show resolved Hide resolved
src/tests/system/tests/test_passkey.py Outdated Show resolved Hide resolved
src/tests/system/tests/test_passkey.py Outdated Show resolved Hide resolved
@madhuriupadhye madhuriupadhye force-pushed the passkey_tests_part1 branch 3 times, most recently from b62b143 to 9bdbcdf Compare April 6, 2023 06:41
@pbrezina
Copy link
Member

pbrezina commented Oct 3, 2023

  • sssd-2-9
    • df709da - tests: add passkey tests for sssctl and non-kerberos authentication
  • master
    • 66c0a2d - tests: add passkey tests for sssctl and non-kerberos authentication

@pbrezina pbrezina closed this Oct 3, 2023
@pbrezina pbrezina added Pushed and removed Accepted Ready to push Ready to push labels Oct 3, 2023
madhuriupadhye added a commit to madhuriupadhye/sssd that referenced this pull request Nov 23, 2023
  Test cases are as follows:
  4. Check auth deny for incorrect pin for LDAP, IPA, Ad and Samba.
  5. Check auth deny for incorrect passkey mapping for LDAP, IPA, AD and Samba.
  6. Check auth of user when server is not resolvable for IPA, LDAP, AD and Samba.

  First PR is under review, SSSD#6634

Signed-off-by: Madhuri Upadhye <[email protected]>
ikerexxe pushed a commit to ikerexxe/sssd that referenced this pull request Nov 23, 2023
  Test cases are as follows:
  4. Check auth deny for incorrect pin for LDAP, IPA, Ad and Samba.
  5. Check auth deny for incorrect passkey mapping for LDAP, IPA, AD and Samba.
  6. Check auth of user when server is not resolvable for IPA, LDAP, AD and Samba.

  First PR is under review, SSSD#6634

Signed-off-by: Madhuri Upadhye <[email protected]>
madhuriupadhye added a commit to madhuriupadhye/sssd that referenced this pull request Nov 23, 2023
  Test cases are as follows:
  4. Check auth deny for incorrect pin for LDAP, IPA, Ad and Samba.
  5. Check auth deny for incorrect passkey mapping for LDAP, IPA, AD and Samba.
  6. Check auth of user when server is not resolvable for IPA, LDAP, AD and Samba.

  First PR is under review, SSSD#6634

Signed-off-by: Madhuri Upadhye <[email protected]>
madhuriupadhye added a commit to madhuriupadhye/sssd that referenced this pull request Nov 23, 2023
  Test cases are as follows:
  4. Check auth deny for incorrect pin for LDAP, IPA, Ad and Samba.
  5. Check auth deny for incorrect passkey mapping for LDAP, IPA, AD and Samba.
  6. Check auth of user when server is not resolvable for IPA, LDAP, AD and Samba.

  First PR is under review, SSSD#6634

Signed-off-by: Madhuri Upadhye <[email protected]>
madhuriupadhye added a commit to madhuriupadhye/sssd that referenced this pull request Nov 23, 2023
  Test cases are as follows:
  4. Check auth deny for incorrect pin for LDAP, IPA, Ad and Samba.
  5. Check auth deny for incorrect passkey mapping for LDAP, IPA, AD and Samba.
  6. Check auth of user when server is not resolvable for IPA, LDAP, AD and Samba.

  First PR is under review, SSSD#6634

Signed-off-by: Madhuri Upadhye <[email protected]>
madhuriupadhye added a commit to madhuriupadhye/sssd that referenced this pull request Nov 23, 2023
  Test cases are as follows:
  4. Check auth deny for incorrect pin for LDAP, IPA, Ad and Samba.
  5. Check auth deny for incorrect passkey mapping for LDAP, IPA, AD and Samba.
  6. Check auth of user when server is not resolvable for IPA, LDAP, AD and Samba.

  First PR is under review, SSSD#6634

Signed-off-by: Madhuri Upadhye <[email protected]>
madhuriupadhye added a commit to madhuriupadhye/sssd that referenced this pull request Nov 23, 2023
  Test cases are as follows:
  4. Check auth deny for incorrect pin for LDAP, IPA, Ad and Samba.
  5. Check auth deny for incorrect passkey mapping for LDAP, IPA, AD and Samba.
  6. Check auth of user when server is not resolvable for IPA, LDAP, AD and Samba.

  First PR is under review, SSSD#6634

Signed-off-by: Madhuri Upadhye <[email protected]>
madhuriupadhye added a commit to madhuriupadhye/sssd that referenced this pull request Nov 23, 2023
  Test cases are as follows:
  4. Check auth deny for incorrect pin for LDAP, IPA, Ad and Samba.
  5. Check auth deny for incorrect passkey mapping for LDAP, IPA, AD and Samba.
  6. Check auth of user when server is not resolvable for IPA, LDAP, AD and Samba.

  First PR is under review, SSSD#6634

Signed-off-by: Madhuri Upadhye <[email protected]>
madhuriupadhye added a commit to madhuriupadhye/sssd that referenced this pull request Nov 23, 2023
  Test cases are as follows:
  4. Check auth deny for incorrect pin for LDAP, IPA, Ad and Samba.
  5. Check auth deny for incorrect passkey mapping for LDAP, IPA, AD and Samba.
  6. Check auth of user when server is not resolvable for IPA, LDAP, AD and Samba.

  First PR is under review, SSSD#6634

Signed-off-by: Madhuri Upadhye <[email protected]>
madhuriupadhye added a commit to madhuriupadhye/sssd that referenced this pull request Nov 24, 2023
  Test cases are as follows:
  4. Check auth deny for incorrect pin for LDAP, IPA, Ad and Samba.
  5. Check auth deny for incorrect passkey mapping for LDAP, IPA, AD and Samba.
  6. Check auth of user when server is not resolvable for IPA, LDAP, AD and Samba.

  First PR is under review, SSSD#6634

Signed-off-by: Madhuri Upadhye <[email protected]>
madhuriupadhye added a commit to madhuriupadhye/sssd that referenced this pull request Nov 24, 2023
  Test cases are as follows:
  4. Check auth deny for incorrect pin for LDAP, IPA, Ad and Samba.
  5. Check auth deny for incorrect passkey mapping for LDAP, IPA, AD and Samba.
  6. Check auth of user when server is not resolvable for IPA, LDAP, AD and Samba.

  First PR is under review, SSSD#6634

Signed-off-by: Madhuri Upadhye <[email protected]>
madhuriupadhye added a commit to madhuriupadhye/sssd that referenced this pull request Nov 24, 2023
  Test cases are as follows:
  4. Check auth deny for incorrect pin for LDAP, IPA, Ad and Samba.
  5. Check auth deny for incorrect passkey mapping for LDAP, IPA, AD and Samba.
  6. Check auth of user when server is not resolvable for IPA, LDAP, AD and Samba.

  First PR is under review, SSSD#6634

Signed-off-by: Madhuri Upadhye <[email protected]>
madhuriupadhye added a commit to madhuriupadhye/sssd that referenced this pull request Nov 27, 2023
  Test cases are as follows:
  4. Check auth deny for incorrect pin for LDAP, IPA, Ad and Samba.
  5. Check auth deny for incorrect passkey mapping for LDAP, IPA, AD and Samba.
  6. Check auth of user when server is not resolvable for IPA, LDAP, AD and Samba.

  First PR is under review, SSSD#6634

Signed-off-by: Madhuri Upadhye <[email protected]>
madhuriupadhye added a commit to madhuriupadhye/sssd that referenced this pull request Nov 27, 2023
  Test cases are as follows:
  4. Check auth deny for incorrect pin for LDAP, IPA, Ad and Samba.
  5. Check auth deny for incorrect passkey mapping for LDAP, IPA, AD and Samba.
  6. Check auth of user when server is not resolvable for IPA, LDAP, AD and Samba.

  First PR is under review, SSSD#6634

Signed-off-by: Madhuri Upadhye <[email protected]>
madhuriupadhye added a commit to madhuriupadhye/sssd that referenced this pull request Nov 27, 2023
  Test cases are as follows:
  4. Check auth deny for incorrect pin for LDAP, IPA, Ad and Samba.
  5. Check auth deny for incorrect passkey mapping for LDAP, IPA, AD and Samba.
  6. Check auth of user when server is not resolvable for IPA, LDAP, AD and Samba.

  First PR is under review, SSSD#6634

Signed-off-by: Madhuri Upadhye <[email protected]>
madhuriupadhye added a commit to madhuriupadhye/sssd that referenced this pull request Nov 27, 2023
  Test cases are as follows:
  4. Check auth deny for incorrect pin for LDAP, IPA, Ad and Samba.
  5. Check auth deny for incorrect passkey mapping for LDAP, IPA, AD and Samba.
  6. Check auth of user when server is not resolvable for IPA, LDAP, AD and Samba.

  First PR is under review, SSSD#6634

Signed-off-by: Madhuri Upadhye <[email protected]>
madhuriupadhye added a commit to madhuriupadhye/sssd that referenced this pull request Nov 27, 2023
  Test cases are as follows:
  4. Check auth deny for incorrect pin for LDAP, IPA, Ad and Samba.
  5. Check auth deny for incorrect passkey mapping for LDAP, IPA, AD and Samba.
  6. Check auth of user when server is not resolvable for IPA, LDAP, AD and Samba.

  First PR is under review, SSSD#6634

Signed-off-by: Madhuri Upadhye <[email protected]>
madhuriupadhye added a commit to madhuriupadhye/sssd that referenced this pull request Nov 27, 2023
  Test cases are as follows:
  4. Check auth deny for incorrect pin for LDAP, IPA, Ad and Samba.
  5. Check auth deny for incorrect passkey mapping for LDAP, IPA, AD and Samba.
  6. Check auth of user when server is not resolvable for IPA, LDAP, AD and Samba.

  First PR is under review, SSSD#6634

Signed-off-by: Madhuri Upadhye <[email protected]>
madhuriupadhye added a commit to madhuriupadhye/sssd that referenced this pull request Nov 27, 2023
  Test cases are as follows:
  4. Check auth deny for incorrect pin for LDAP, IPA, Ad and Samba.
  5. Check auth deny for incorrect passkey mapping for LDAP, IPA, AD and Samba.
  6. Check auth of user when server is not resolvable for IPA, LDAP, AD and Samba.

  First PR is under review, SSSD#6634

Signed-off-by: Madhuri Upadhye <[email protected]>
madhuriupadhye added a commit to madhuriupadhye/sssd that referenced this pull request Nov 28, 2023
  Test cases are as follows:
  4. Check auth deny for incorrect pin for LDAP, IPA, Ad and Samba.
  5. Check auth deny for incorrect passkey mapping for LDAP, IPA, AD and Samba.
  6. Check auth of user when server is not resolvable for IPA, LDAP, AD and Samba.

  First PR is under review, SSSD#6634

Signed-off-by: Madhuri Upadhye <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
passkey Issues and PRs related to 'passkey' feature Pushed Tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants